package com.zt.ztzx.controller;

import com.zt.ztzx.model.entity.product.TFarm;
import com.zt.ztzx.model.vo.common.Result;
import com.zt.ztzx.service.TFarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("farm")
public class FarmController {

    @Autowired
    private TFarmService farmService;

    @GetMapping("list")
    public Result<List<TFarm>> list(){
        return farmService.selectList();
    }
}
